package com.appwoo.txtws.service;

import android.content.Context;
import android.util.Xml;
import com.appwoo.android.exception.NotFoundNetWorkException;
import com.appwoo.android.exception.TimeOutException;
import com.appwoo.android.util.PullIO;
import com.appwoo.txtws.bean.CapPicTimeBean;
import com.appwoo.txtws.bean.CapturePicBean;
import com.appwoo.txtws.component.GetDateTime;
import com.appwoo.txtws.component.Logger;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

public class CaptureService
{
  public List<CapturePicBean> getCapPicListByTime(String paramString1, String paramString2, String paramString3, int paramInt, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {//paramString1=userId   paramString2=equipName    paramString3=picTime    paramInt=page
    CapturePicBean localCapturePicBean = null;
    MsgService localMsgService = new MsgService();
    Object localObject1 = null;
    String str = localMsgService.sendMessage(paramString1, "<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR> <RCVR>SYS</RCVR>" + " <SEQN>1</SEQN><DTTM>" + GetDateTime.getDateTime() + "</DTTM><TYPE>" + "RQCapturePic</TYPE></HEAD><BODY><BID>" + paramString2 + "</BID><DataDate>" + paramString3 + "</DataDate>" + "<PageIndex>" + paramInt + "</PageIndex><PageSize>" + 10 + "</PageSize></BODY></MSG>", paramContext);
    Object localObject2 = Xml.newPullParser();
    int i;
    try
    {
      XmlPullParser localXmlPullParser = PullIO.getPullByString(str);
      localObject2 = localXmlPullParser;
      Logger.d("bod", "cappic-str:" + str);
      i = ((XmlPullParser)localObject2).getEventType();
      if (i == 1)
        return localObject1;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
      switch (i)
      {
      case 1:
      default:
      case 0:
      case 2:
      case 3:
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject2).next();
      break;
      localObject1 = new ArrayList();
      continue;
      if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("List"))
        localCapturePicBean = new CapturePicBean();
      if (localCapturePicBean != null)
        if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("PicName"))
        {
          localCapturePicBean.setPicName(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("PicPath"))
        {
          localCapturePicBean.setPicPath(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("PicMiddle"))
        {
          localCapturePicBean.setPicMiddle(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("PicThumb"))
        {
          localCapturePicBean.setPicThumb(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("CaptureTime"))
        {
          localCapturePicBean.setCaptureTime(((XmlPullParser)localObject2).nextText());
          continue;
          if ((((XmlPullParser)localObject2).getName().equalsIgnoreCase("list")) && (localObject1 != null) && (localCapturePicBean != null))
          {
            ((List)localObject1).add(localCapturePicBean);
            localCapturePicBean = null;
          }
        }
    }
  }

  public List<CapPicTimeBean> getCapPicTimeList(String paramString1, String paramString2, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    CapPicTimeBean localCapPicTimeBean = null;
    MsgService localMsgService = new MsgService();
    Object localObject1 = null;
    String str = localMsgService.sendMessage(paramString1, paramString2, "<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR> <RCVR>SYS</RCVR>" + " <SEQN>1</SEQN><DTTM>" + GetDateTime.getDateTime() + "</DTTM><TYPE>" + "RQCapPicTime</TYPE></HEAD><BODY><UserID>" + paramString1 + "</UserID></BODY></MSG>", paramContext);
    Object localObject2 = Xml.newPullParser();
    int i;
    try
    {
      XmlPullParser localXmlPullParser = PullIO.getPullByString(str);
      localObject2 = localXmlPullParser;
      i = ((XmlPullParser)localObject2).getEventType();
      if (i == 1)
        return localObject1;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
      switch (i)
      {
      case 1:
      default:
      case 0:
      case 2:
      case 3:
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject2).next();
      break;
      localObject1 = new ArrayList();
      continue;
      if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("List"))
        localCapPicTimeBean = new CapPicTimeBean();
      if ((localCapPicTimeBean != null) && (((XmlPullParser)localObject2).getName().equalsIgnoreCase("CaptureTime")))
      {
        localCapPicTimeBean.setCaptureTime(((XmlPullParser)localObject2).nextText());
        continue;
        if ((((XmlPullParser)localObject2).getName().equalsIgnoreCase("List")) && (localObject1 != null) && (localCapPicTimeBean != null))
        {
          ((List)localObject1).add(localCapPicTimeBean);
          localCapPicTimeBean = null;
        }
      }
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.service.CaptureService
 * JD-Core Version:    0.6.2
 */